/*     */ package com.umeng.analytics;
/*     */ 
/*     */ import android.content.Context;
/*     */ import android.content.SharedPreferences;
/*     */ import android.content.SharedPreferences.Editor;
/*     */ import android.text.TextUtils;
/*     */ import java.util.Vector;
/*     */ 
/*     */ public class k
/*     */ {
/*     */   private Vector<Long> a;
/*     */   private static final int b = 4;
/*     */   private String c;
/*     */ 
/*     */   public k(String paramString)
/*     */   {
/*  26 */     this.a = new Vector(4);
/*  27 */     this.c = paramString;
/*     */   }
/*     */ 
/*     */   public k(String paramString, int paramInt) {
/*  31 */     this.c = paramString;
/*  32 */     if (paramInt < 0)
/*  33 */       this.a = new Vector(4);
/*     */     else
/*  35 */       this.a = new Vector(paramInt);
/*     */   }
/*     */ 
/*     */   public void a(Long paramLong)
/*     */   {
/*  47 */     while (this.a.size() >= 4) {
/*  48 */       this.a.remove(0);
/*     */     }
/*     */ 
/*  51 */     this.a.add(paramLong);
/*     */   }
/*     */ 
/*     */   public Long a()
/*     */   {
/*  61 */     int i = this.a.size();
/*  62 */     if (i <= 0) {
/*  63 */       return Long.valueOf(-1L);
/*     */     }
/*  65 */     return (Long)this.a.remove(i - 1);
/*     */   }
/*     */ 
/*     */   public int b()
/*     */   {
/*  70 */     return this.a.size();
/*     */   }
/*     */ 
/*     */   public String toString()
/*     */   {
/*  80 */     int i = this.a.size();
/*     */ 
/*  82 */     if (i <= 0) return null;
/*     */ 
/*  84 */     StringBuffer localStringBuffer = new StringBuffer(4);
/*     */ 
/*  86 */     for (int j = 0; j < i; j++) {
/*  87 */       localStringBuffer.append(this.a.get(j));
/*     */ 
/*  89 */       if (j != i - 1) localStringBuffer.append(",");
/*     */     }
/*     */ 
/*  92 */     this.a.clear();
/*     */ 
/*  94 */     return localStringBuffer.toString();
/*     */   }
/*     */ 
/*     */   public static k a(Context paramContext, String paramString)
/*     */   {
/* 105 */     SharedPreferences localSharedPreferences = j.e(paramContext);
/* 106 */     String str = localSharedPreferences.getString(paramString, null);
/*     */ 
/* 108 */     return a(paramString, str);
/*     */   }
/*     */ 
/*     */   public static k a(String paramString1, String paramString2)
/*     */   {
/* 113 */     k localk = new k(paramString1);
/*     */ 
/* 115 */     if (TextUtils.isEmpty(paramString2)) {
/* 116 */       return localk;
/*     */     }
/*     */ 
/* 119 */     String[] arrayOfString = paramString2.split(",");
/* 120 */     int i = arrayOfString.length;
/*     */ 
/* 122 */     for (int j = 0; j < i; j++)
/*     */     {
/* 124 */       String str = arrayOfString[j].trim();
/* 125 */       if (!TextUtils.isEmpty(str))
/*     */       {
/* 128 */         Long localLong = Long.valueOf(-1L);
/*     */         try {
/* 130 */           localLong = Long.valueOf(Long.parseLong(str));
/*     */         } catch (Exception localException) {
/* 132 */           continue;
/*     */         }
/* 134 */         localk.a(localLong);
/*     */       }
/*     */     }
/* 137 */     return localk;
/*     */   }
/*     */ 
/*     */   public void a(Context paramContext) {
/* 141 */     String str = toString();
/* 142 */     SharedPreferences.Editor localEditor = j.e(paramContext).edit();
/*     */ 
/* 144 */     if (TextUtils.isEmpty(str)) {
/* 145 */       localEditor.remove(this.c).commit();
/* 146 */       return;
/*     */     }
/*     */ 
/* 149 */     localEditor.putString(this.c, str).commit();
/*     */   }
/*     */ }

/* Location:           C:\Users\Administrator\Desktop\umeng_sdk.jar
 * Qualified Name:     com.umeng.analytics.k
 * JD-Core Version:    0.6.2
 */